home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / New System Software Extensions / ASLM SDK v1.1.2 / ASLM Examples / Inspector / Sources / Inspector.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-21  |  2.4 KB  |  94 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Inspector.h
  3.  
  4.     Contains:    Interface for a ASLM Test application.
  5.  
  6.     Copyright:    © 1991-1993 by Apple Computer, Inc., all rights reserved.
  7.  
  8. */
  9.  
  10. #ifndef __INSPECTOR__
  11. #define __INSPECTOR__
  12.  
  13. #ifndef __APPLICATION__
  14. #include <Application.h>
  15. #endif
  16.  
  17. #ifndef __LIBRARYMANAGERCLASSES__
  18. #include <LibraryManagerClasses.h>
  19. #endif
  20.  
  21. class TRegisteredObjectsWindow;
  22. class TRegisteredObjects;
  23. class TLibraryManager;
  24.  
  25. class TInspector;
  26.  
  27. const int    kMaxDocuments = 50;
  28. const int    kWindowListStart = 4;    /* where the list of windows starts in the windows menu */
  29.  
  30. enum {kNoCmd, kReloadLibraryManagerCmd, kUnloadLibraryManagerCmd, kGotoSimpleProgramCmd};
  31.  
  32. const size_t kInspectorPoolSize = 25000;
  33.  
  34. #define kInspectorLibID "slm:tapp$,1.1"
  35.  
  36. /**********************************************************************
  37. ** class TInspector
  38. ***********************************************************************/
  39.  
  40. #define kTInspectorID "appl:insp$TInspector,1.1"
  41.  
  42. class TInspector : public TApplication {
  43. public:
  44.                                 TInspector(Ptr qdPtr, Boolean initToolbox = true);
  45.     virtual                        ~TInspector();
  46.  
  47.     virtual    void                DoIdle();
  48.     virtual    void                AdjustMenus();
  49.     virtual    void                AdjustCursor();
  50.     virtual    void                DoMenuCommand(short menuID, short menuItem);
  51.     virtual    void                DoNew(TRegisteredObjects*);
  52.     virtual    void                Terminate();
  53.  
  54.     // New Methods
  55.  
  56.             TScheduler*            GetUpdateListsScheduler();
  57.             short                GetLibraryManagerCmd();
  58.     
  59.     static    void                UnloadLibraryManager();
  60.     static    void                LoadLibraryManager();
  61.     static    int                    TInspector::Main();
  62.     static    void                DeathNotifierProc(TInspector* me, EventCode event, OSErr, TLibraryManager* libmgr);
  63.     static    void                Boot();
  64.     static    void                Cleanup();
  65.     
  66.     static    void                SimpleProgram();
  67.     static    void                SimpleDoEventLoop();
  68.     static    void                SimpleAdjustMenus();
  69.     static    void                SimpleDoMenuCommand(short menuID, short menuItem);
  70.  
  71. private:
  72.     short                fLibraryManagerCmd;
  73.     TScheduler*            fUpdateListsScheduler;
  74.     TDocument*            fWindowsMenuDocList[kMaxDocuments]; // documents in the Windows menu
  75.     Point                fNextWindowLocation;
  76.     short                fHTopWindowLocation;
  77. };
  78.  
  79. /*    -----------------------------------------------------------------
  80.     inline methods
  81.     ----------------------------------------------------------------- */
  82.  
  83.     inline TScheduler* TInspector::GetUpdateListsScheduler()
  84.     {
  85.         return fUpdateListsScheduler;
  86.     }
  87.         
  88.     inline short TInspector::GetLibraryManagerCmd()
  89.     {
  90.         return fLibraryManagerCmd;
  91.     }
  92.  
  93. #endif
  94.